package mr.ali.webvideo.controller;


import mr.ali.webvideo.model.CollectionCllect;
import mr.ali.webvideo.service.ICollectionCllectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-08-16
 */
@RestController
@RequestMapping("/h5/collectionCllect")
public class CollectionCllectController {

    @Resource
    private ICollectionCllectService collectionCllectService;

    @GetMapping("/all")
    public List<CollectionCllect> findAll(Integer userId, Integer videoId){
        return collectionCllectService.findAll(userId, videoId);
    }

    @GetMapping("/delete")
    public Integer delete(Integer userId, Integer videoId){
        return collectionCllectService.delete(userId, videoId);
    }

    @GetMapping("/insert")
    public Integer insert(Integer userId, Integer videoId){
        return collectionCllectService.insert(userId, videoId);
    }

}
